import request from '@/utils/request'

// 查询新闻与公告列表
export function listNewsbulletin(query) {
  return request({
    url: '/system/newsbulletin/list',
    method: 'get',
    params: query
  })
}

// 查询新闻与公告列表
export function listNewsbulletinAll(query) {
  return request({
    url: '/system/newsbulletin/all',
    method: 'get',
    params: query
  })
}
// 查询新闻与公告详细
export function getNewsbulletin(nbId) {
  return request({
    url: '/system/newsbulletin/' + nbId,
    method: 'get'
  })
}

// 新增新闻与公告
export function addNewsbulletin(data) {
  return request({
    url: '/system/newsbulletin',
    method: 'post',
    data: data
  })
}

// 修改新闻与公告
export function updateNewsbulletin(data) {
  return request({
    url: '/system/newsbulletin',
    method: 'put',
    data: data
  })
}

// 删除新闻与公告
export function delNewsbulletin(nbId) {
  return request({
    url: '/system/newsbulletin/' + nbId,
    method: 'delete'
  })
}

